package com.tanhua.server.service;

import com.tanhua.dubbo.api.mongo.UserLocationApi;
import com.tanhua.server.interceptor.UserHolder;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

@Service
public class BaiduService {
    @DubboReference
    private UserLocationApi userLocationApi;

    public void updateLocation(Double latitude, Double longitude, String addrStr) {
        Long userId = UserHolder.getId();
        userLocationApi.updateOrSaveLocation(userId,latitude,longitude,addrStr);
    }
}
